#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "DirectedRelationship.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class Package;

/// <summary>
/// PackageMerge
/// A package merge defines how the contents of one package are extended by the
/// contents of another package.
/// </summary>
class UMLMODEL_EXPORT PackageMerge : public DirectedRelationship {

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// mergedPackage getter
    /// References the Package that is to be merged with the receiving package of the
    /// PackageMerge.
    /// </summary>
    shared_ptr<Package> mergedPackage() const;

    /// <summary>
    /// mergedPackage setter
    /// References the Package that is to be merged with the receiving package of the
    /// PackageMerge.
    /// </summary>
    void setMergedPackage(shared_ptr<Package> value);

    /// <summary>
    /// receivingPackage getter
    /// References the Package that is being extended with the contents of the merged
    /// package of the PackageMerge.
    /// </summary>
    shared_ptr<Package> receivingPackage() const;

    /// <summary>
    /// receivingPackage setter
    /// References the Package that is being extended with the contents of the merged
    /// package of the PackageMerge.
    /// </summary>
    void setReceivingPackage(shared_ptr<Package> value);

private: // Fields
    /// <summary>
    /// mergedPackage
    /// References the Package that is to be merged with the receiving package of the
    /// PackageMerge.
    /// </summary>
    shared_ptr<Package> mergedPackage_;

    /// <summary>
    /// receivingPackage
    /// References the Package that is being extended with the contents of the merged
    /// package of the PackageMerge.
    /// </summary>
    shared_ptr<Package> receivingPackage_;

};

} // namespace uml
